package com.ima.service;

import com.ima.repository.PersionRepository;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * Created by win7 on 2018/2/28.
 */
@Service
public class PersionService{

    @Resource
    PersionRepository persionRepository;

    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
    public int testUpdate(String userName){
       return persionRepository.testUpdate(userName);
    }
}
